/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package view.GUI.actions;

import controller.commands.RedrawCommand;
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import model.graphic.objects.Graphical;
import view.GUI.graphic.GraphicView;

/**
 *
 * @author Jelle
 */
public class ReDrawAction extends AbstractAction {

    private GraphicView gview;
    private Graphical g;

    public ReDrawAction(GraphicView gview, Graphical g) {
        this.gview = gview;
        this.g=g;
    }

    public void actionPerformed(ActionEvent e) {
        System.out.println("ReDrawAction actionPerformed");
        gview.notifyObservers(new RedrawCommand(g));
    }
}
